package cn.com.surker.dto.main;

import cn.com.surker.common.BaseGroupValidated;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * <p>
 * 主材材料结算信息表
 * </p>
 *
 * @author admin
 * @since 2024-12-03
 */
@Data
public class MainMaterialBillAddDTO extends BaseGroupValidated {


    @NotNull(message = "标识不能为空！", groups = {UpdateStatusGroup.class, UpdateGroup.class})
    private Long id;

    /**
     * 公司ID
     */
    @NotNull(message = "公司标识不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private Long orgId;

    /**
     * 公司
     */
    @NotNull(message = "公司名称不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private String orgName;

    /**
     * 供应商ID
     */
    @NotNull(message = "供应商标识不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private Long supplierId;

    /**
     * 供应商
     */
    @NotNull(message = "供应商名称不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private String supplier;

    private Long transportId;

    private String transport;

    /**
     * 结算时间
     */
    @NotNull(message = "结算时间不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private String today;

    /**
     * 报表开始时间
     */
    @NotNull(message = "报表开始时间不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private String startTime;

    /**
     * 报表结束时间
     */
    @NotNull(message = "报表结束时间不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private String endTime;

    /**
     * 材料ID
     */
    @NotNull(message = "材料标识不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private Long materialId;

    /**
     * 材料名称
     */
    @NotNull(message = "材料名称不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private String material;

    /**
     * 供方净重
     */
    private Double supplierWeight;

    /**
     * 过磅净重
     */
    @NotNull(message = "过磅净重不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private Double weight;

    /**
     * 价格生效时间
     */
    @NotNull(message = "价格生效时间不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private String takeTime;

    /**
     * 单价
     */
    @NotNull(message = "单价不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private Double price;

    /**
     * 类型(0：主材，1：运输)
     */
    private Integer type;

    /**
     * 费用类型(0:结算1:补贴)
     */
    @NotNull(message = "费用类型不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private Integer priceType;

    /**
     * 是否结算(0:结算，1:不结算)
     */
    @NotNull(message = "是否结算不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private Integer isBill;

    private Integer isAuto;

    /**
     * 是否审核(0:未审核1:已审核)
     */
    private Integer isCheck;

    /**
     * 审核人
     */
    private String checker;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkTime;

    /**
     * 是否审核(0:未审核1:已审核)
     */
    private Integer isFinance;

    /**
     * 过磅结算类型
     */
    private Integer billWeightType;

    /**
     * 财务审核人
     */
    private String finance;

    /**
     * 财务审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date financeTime;

    /**
     * 状态(0:启用1：禁用)
     */
    @NotNull(message = "启用状态不能为空", groups = {UpdateStatusGroup.class})
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 调价备注
     */
    private String priceRemark;

    /**
     * 0云端 1本地
     */
    private Integer isCloud;

}
